package com.ruoyi.base.domain;

import java.util.Date;

import javax.validation.constraints.NotBlank;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 老师对象 base_teacher
 * 
 * @author yepanpan
 * @date 2020-11-09
 */
@ApiModel("老师实体")
@Getter
@Setter
public class BaseTeacher extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增长主键ID */
    private Long id;

    /** 所属部门 */
    @ApiModelProperty("所属部门ID")
    private Long deptId;

    @Excel(name = "所属部门")
    @ApiModelProperty("所属部门")
    private String deptName;

    /** 工号 */
    @Excel(name = "工号")
    @ApiModelProperty("工号")
    @NotBlank(message="工号不能为空")
    private String code;

    /** 姓名 */
    @Excel(name = "姓名")
    @ApiModelProperty("姓名")
    @NotBlank(message="姓名不能为空")
    private String name;

    /** 类型 */
    @Excel(name = "类型", dictType = "teacher_type")
    @ApiModelProperty("类型")
    private String type;

    /** 性别 */
    @Excel(name = "性别", prompt = "必填项", dictType = "sys_user_sex", combo = {"男","女"})
    @ApiModelProperty("性别")
    @NotBlank(message="性别不能为空")
    private String sex;

    /** 出生日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("出生日期")
    private Date birthday;

    /** 学历 */
    @Excel(name = "学历", dictType = "base_education")
    @ApiModelProperty("学历")
    private String education;

    /** 学位 */
    @Excel(name = "学位", dictType = "base_degree")
    @ApiModelProperty("学位")
    private String degree;

    /** 身份证件号 */
    @ApiModelProperty("身份证件号")
    private String idcard;

    /** 电话 */
    @Excel(name = "电话")
    @ApiModelProperty("电话")
    private String phone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    @ApiModelProperty("邮箱")
    private String email;

    /** 住址 */
    @Excel(name = "住址")
    @ApiModelProperty("住址")
    private String address;

    /** 入校日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "入校日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("入校日期")
    private Date startDate;

    /** 离校日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "离校日期", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("离校日期")
    private Date endDate;

    /** 用户ID */
    private Long userId;

    /** 状态 */
    @Excel(name = "状态", dictType = "common_status")
    @ApiModelProperty("状态")
    @NotBlank(message="状态不能为空")
    private String status;


	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("deptId", getDeptId())
            .append("deptName", getDeptName())
            .append("code", getCode())
            .append("name", getName())
            .append("type", getType())
            .append("sex", getSex())
            .append("birthday", getBirthday())
            .append("education", getEducation())
            .append("degree", getDegree())
            .append("idcard", getIdcard())
            .append("phone", getPhone())
            .append("email", getEmail())
            .append("address", getAddress())
            .append("startDate", getStartDate())
            .append("endDate", getEndDate())
            .append("userId", getUserId())
            .append("status", getStatus())
            .toString();
    }
}
